<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateVoteProjectsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('vote_projects', function(Blueprint $table)
		{
      $table->increments('id');
      $table->string('title', 32)->unique();  // 投票活动标题
      $table->date('begin_date');             // 投票开始日期
      $table->date('end_date');               // 投票结束日期
      $table->tinyInteger('is_lock');         // 是否锁定, 锁定后活动结束
      $table->string('remark')->nullable();   // 备注
      $table->nullableTimestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::dropIfExists('vote_projects');
	}

}
